/*
 * @Author: humengchuan 531537052@qq.com
 * @Date: 2024-03-26 23:37:46
 * @LastEditors: humengchuan 531537052@qq.com
 * @LastEditTime: 2024-06-27 16:08:33
 * @FilePath: \project\node-project\server\services\admin\UserService.js
 * @Description: user数据查询
 */
const UserModel = require('../../models/UserModel')
const UserService = {
    login: async ({username, password}) => {
        return UserModel.find({username, password})
    },
    info: async (id) => {
        return UserModel.findById(id)
    },
    list: async () => {
        return UserModel.find().skip(0).limit(5)
    },
}

module.exports = UserService